package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.StockOutTypeManagementMapper;
import com.ruoyi.system.domain.StockOutTypeManagement;
import com.ruoyi.system.service.IStockOutTypeManagementService;

/**
 * 出库类型设置 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-30
 */
@Service
public class StockOutTypeManagementServiceImpl implements IStockOutTypeManagementService
{
    @Autowired
    private StockOutTypeManagementMapper stockOutTypeManagementMapper;

    /**
     * 查询出库类型设置
     *
     * @param id 出库类型设置主键
     * @return 出库类型设置
     */
    @Override
    public StockOutTypeManagement selectStockOutTypeManagementById(Long id)
    {
        return stockOutTypeManagementMapper.selectStockOutTypeManagementById(id);
    }

    /**
     * 通过出库类型名称查询出库类型设置列表
     *
     * @param typeName 出库类型名称
     * @return 出库类型设置
     */
    @Override
    public List<StockOutTypeManagement> selectStockOutTypeManagementListByName(String typeName)
    {
        return stockOutTypeManagementMapper.selectStockOutTypeManagementListByName(typeName);
    }

    /**
     * 新增出库类型设置
     *
     * @param stockOutTypeManagement 出库类型设置
     * @return 结果
     */
    @Override
    public int insertStockOutTypeManagement(StockOutTypeManagement stockOutTypeManagement)
    {
        return stockOutTypeManagementMapper.insertStockOutTypeManagement(stockOutTypeManagement);
    }

    /**
     * 修改出库类型设置
     *
     * @param stockOutTypeManagement 出库类型设置
     * @return 结果
     */
    @Override
    public int updateStockOutTypeManagement(StockOutTypeManagement stockOutTypeManagement)
    {
        return stockOutTypeManagementMapper.updateStockOutTypeManagement(stockOutTypeManagement);
    }

    /**
     * 通过id批量删除出库类型设置信息
     *
     * @param ids 需要删除的出库类型设置主键
     * @return 结果
     */
    @Override
    public int deleteStockOutTypeManagementByIds(Long[] ids)
    {
        return stockOutTypeManagementMapper.deleteStockOutTypeManagementByIds(ids);
    }

    /**
     * 通过id删除出库类型设置信息
     *
     * @param id 出库类型设置主键
     * @return 结果
     */
    @Override
    public int deleteStockOutTypeManagementById(Long id)
    {
        return stockOutTypeManagementMapper.deleteStockOutTypeManagementById(id);
    }
}
